package com.zc.basic.app.controller;

import com.zc.basic.domain.dto.DeptUserDto;
import com.zc.basic.infra.mapper.DeptUserDtoMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping(value = "/ogz")
public class OrganizationController {

    @Autowired
    private DeptUserDtoMapper deptUserDtoMapper;

    @RequestMapping(value = "/tree")
    public List<DeptUserDto> queryDefaultTree() {
        List<DeptUserDto> deptUserDtos = deptUserDtoMapper.queryDefaultTree();
        return deptUserDtos;
    }

}
